<?php

namespace App\Http\Requests\Admin\ServiceBank;

use Illuminate\Foundation\Http\FormRequest;

class ServiceBankCreate extends FormRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * 定义表单规则
     *
     * Date: 13/04/2018
     * @author Tenny
     * @return array
     */
    public function rules()
    {
        return [
            'service_id' => 'required',
            'bank' => 'required',
            'bank_name' => 'required',
            'real_name' => 'required',
            'bank_card' => 'required',
            'phone' => 'required',
            'status' => 'required',
        ];
    }

    /**
     * 定义错误响应消息
     *
     * Date: 13/04/2018
     * @author Tenny
     * @return array
     */
    public function messages()
    {
        return [
            'service_id.required' => '请上传服务站id',
            'bank.required' => '请输入开户行',
            'bank_name.required' => '请输入银行名称',
            'real_name.required' => '请输入开户人姓名',
            'bank_card.required' => '请输入银行卡号',
            'phone.required' => '请输入联系电话',
            'status.required' => '请输入状态值',
        ];
    }
}
